#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <iostream>

class Convert_bond {
public:
	Convert_bond();
	void setUnderlyingValue(double);
	void setVol(double);
	void setStrike(double); //callable strike -- if bond price exceeds this price, issuer can call the bond
	void setStrike2(double); //put strike -- if bond price drops beneath this price, bond holders can convert to a cash amount designated by the strike
	void setInterest(double);
	void setTimeToMaturity(double); 
	void setDividendRate(double); 
	void setConversionRatio(double);//number of shares for a given bond
	void setNotional(double);
	void compute();
	void printInputs();
	double getFairValue();
	double getBondValue();
	double getPutValue();
	double getConversionValue();
	double getParity();
	double getParity_Delta();
	double getInterest_Rate_Delta(); // in % points
	double getParityGamma(); 

private:
	double underPrice;
	double vol;
	double strike;
	double strike2;	//applicable for option strategies: strike < strike2 < strike3
	double interest;
	double days;
	int putcall;
	double current_value;
	double conversion_intrinsic_value;
	double put_value;
	double bond_value;
	double maturity;
	double days_in_year;
	double dividend_rate;
	double conversion_ratio;
	double notional;
	
};
